package com.txunda.zhuohired.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;

import com.txunda.zhuohired.R;

/**
 * 创建人： Txd_Cjh
 * 创建时间： 2018/03/05 14:48
 * 功能描述：申请面试
 * 联系方式：jiahuanchen@126.com
 */

public class ApplyDialog extends Dialog implements View.OnClickListener {
    private ApplyListener applyListener;
    private Context context;


    public ApplyDialog(Context context, ApplyListener applyListener) {
        super(context, R.style.dialog_style);
        this.context = context;
        this.applyListener = applyListener;

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_apply);
        findViewById(R.id.tv_dialog_apply_cancel).setOnClickListener(this);
        findViewById(R.id.tv_dialog_apply_sure).setOnClickListener(this);
    }


    @Override
    public void onClick(View view) {
        this.dismiss();
        switch (view.getId()) {
            case R.id.tv_dialog_apply_sure://确认
                applyListener.onApply("1");
                break;
        }
    }

    public interface ApplyListener {
        void onApply(String type);
    }
}
